package com.xxd.spring.boot.demo.wubolin;

import lombok.Getter;
import lombok.Setter;

@Getter
public class Result {
    @Setter
    private String message;
    @Setter
    private String code;
    private Object data;

    public Result setData(Object data) {
        this.data = data;
        return this;
    }

    public Result success() {
        this.message = "成功";
        this.code = "200";
        return this;
    }

    public Result error() {
        this.message = "服务器异常";
        this.code = "500";
        return this;
    }
}
